import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
// 导入全局样式
import '../src/assets/css/global.css'
  
import TreeTable from 'vue-table-with-tree-grid'

// 导入富文本编辑器

import VueQuillEditor from 'vue-quill-editor'

import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme

import axios from 'axios'
// 配置请求的根路径
axios.defaults.baseURL='http://127.0.0.1:8888/api/private/v1/'
<<<<<<< HEAD
//通过axiox请求拦截器添加token，保证拥有获取数据的权限
axios.interceptors.request.use(config=>{
  console.log(config)
  // 为请求头对象，添加token验证的Authorization字段
  config.headers.Authorization=window.sessionStorage.getItem('token')
  // 在最后必须return config
  return config
})
=======
>>>>>>> 80ac5b9e90b4f636b9dca860f650629e44958aa0
Vue.prototype.$http=axios

Vue.config.productionTip = false

Vue.component('tree-table',TreeTable)

// 将富文本编辑器注册为全局组件
Vue.use(VueQuillEditor)

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
